<?php
// One place_holder template, so grab only the first place_holder elements
$ph1_blocks = isset($this->blocks[1]) ? $this->blocks[1] : array();
$ph2_blocks = isset($this->blocks[2]) ? $this->blocks[2] : array();

?>
  
<?php
    $this->placeholder('blocksRight')->captureStart();
            $authDisplayed = false;
            foreach ($ph1_blocks as $block){
                $module = $block['module'];
                switch ($block['params']['secured'])
                {
                    case 1:
                        $user = Zend_Registry::get('user');
                        if(count($user))
                            echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                    case 2:
                        $user = Zend_Registry::get('user');
                        if(!count($user))
                            echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                    default:
                        echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                }
            }
    $this->placeholder('blocksRight')->captureEnd();
    ?>
<div id="content_menu">

    <div id="content-left" class="menu">

        <?php echo $this->placeholder('blocksRight') ?>
       
    </div>
    
</div>

<!-- Start : MAIN -->
<div id='content'>  

    <?php if ($this->showTitle): ?>
        <h1 id="title-bloc" class="font_size_xxLarge color_two"><?php echo $this->pageTitle ?></h1>
    <?php endif; ?>

    <!-- Placeholder 1 -->
    <?php
    $this->placeholder('blocksLeft')->captureStart();
            $authDisplayed = false;
            foreach ($ph2_blocks as $block){
                $module = $block['module'];
                switch ($block['params']['secured'])
                {
                    case 1:
                        $user = Zend_Registry::get('user');
                        if(count($user))
                            echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                    case 2:
                        $user = Zend_Registry::get('user');
                        if(!count($user))
                            echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                    default:
                        echo $this->action($block['action'],'index',$module, $block['params']);
                        break;
                }
            }
    $this->placeholder('blocksLeft')->captureEnd();
    ?>
    <div class="content-left">
        <?php echo $this->placeholder('blocksLeft') ?>
    </div>


</div>

<div id="spacer"></div>